#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e3+1000;
typedef int LL;
const LL mod=1e9+7;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL dp[11][maxn][maxn];
LL sum[maxn];
int main(void){
   cin.tie(0);std::ios::sync_with_stdio(false);
   LL n,m;cin>>n>>m;
   for(LL i=1;i<=n;i++){
      for(LL j=i;j<=n;j++){
          dp[1][i][j]=1;
      }
   }
   for(LL len=2;len<=m;len++){
       memset(sum,0,sizeof(sum));
       for(LL i=1;i<=n;i++){
           LL temp=0;
           for(LL j=n;j>=i;j--){
               temp=(temp%mod+dp[len-1][i][j]%mod)%mod;
               sum[j]=(sum[j+1]+temp)%mod;
               dp[len][i][j]=sum[j]%mod;
           }
       }
   }
   long long ans=0;
   for(LL i=1;i<=n;i++){
      for(LL j=i;j<=n;j++){
          ans=(ans%mod+dp[m][i][j]%mod)%mod;
      }
   }
   cout<<ans<<"\n";
   return 0;
}
